package com.qf.service;

import com.codingapi.txlcn.tc.annotation.LcnTransaction;
import com.qf.dao.AUserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.client.RestTemplate;

@Service
public class AServiceImpl implements AService{
    @Autowired
    private AUserDao userDao;
    @Autowired
    private RestTemplate restTemplate;
    @Override
    @Transactional
    @LcnTransaction
    public void minus() {
        userDao.minus();

        restTemplate.getForObject("http://localhost:8081/b/add",String.class);

    }
}
